# -*- coding: utf-8 -*-



from system.Log import Logger

log = Logger("api-test")


def api(protocol, host, port, method, path=None, **kwargs):
    """
    :param protocol:
    :param host:
    :param port:
    :param kwargs:
    :param method:
    :param path:
    :return:
    """
    kwargs.update({
        "url": f"{protocol}://{host}:{port}/{path}",
        "method": method,
    })
    for key in kwargs:
        log.logger.info(f"api中有：{key}, 值为：{kwargs[f'{key}']}")

    return kwargs
